#include <stdio.h>
#include <stdlib.h>
#include <errno.h> 
#include <ctype.h>
int main(void)
{
	FILE* output;
	errno_t err;
	FILE* input;
	errno_t err1;
	char in[20];
	char out[20];
	char ch;
	printf("输入需要被转移的文件名(包含尾缀)\n");
	scanf_s("%s", out, 20);
	if ((err = fopen_s(&output, out, "r")) != 0)
	{
		printf("out open failed   %s\n", errno);
		exit(EXIT_FAILURE);
	}
	else
	{
		printf("out open success\n");
	}
	printf("输入转移进入的文件名(包含尾缀)\n");
	scanf_s("%s", in, 20);
	if ((err = fopen_s(&input, in, "w")) != 0)
	{
		printf("in open failed   %s\n", errno);
		exit(EXIT_FAILURE);
	}
	else
	{
		printf("in open success\n");
	}
	while ((ch = getc(output)) != EOF)
	{
		putc((toupper(ch)), input);
	}
	if ((fclose(output)) != 0)
		printf("output close failed.");
	if ((fclose(input)) != 0)
		printf("intput close failed.");
	return 0;
}